<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>商品添加</title>

</head>
<style>
    .basic-grey {
        margin-left: auto;
        margin-right: auto;
        max-width: 600px;
        background: #F7F7F7;
        padding: 25px 15px 25px 10px;
        font: 12px Georgia, "Times New Roman", Times, serif;
        color: #888;
        text-shadow: 1px 1px 1px #FFF;
        border: 1px solid #E4E4E4;
    }

</style>
<script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.1.1/jquery.min.js"></script>
<script>
    function back(){
        window.location.href = "/order/listorder";
    }
</script>
<body>

    <form id="orderInfo" action="/order/add" method="post" class="basic-grey" >
        <button type="button" onclick="back()">查看订单</button>
        <h1>购物车</h1>
        <label>
            <span>Your Name :</span>
            <input id="psnName" readonly  type="text" name="psnName" value="张三" />
        </label>
        <label>

            <table>
                <tr>
                    <th>商品名称</th>
                    <th>商品价格</th>
                    <th>数量</th>
                </tr>
                <tr>
                    <td><input id="orderDetails[0].name" type="text" name="orderDetails[0].name"
                            value="iphone13 128g" /></td>
                    <td><input id="orderDetails[0].price" type="number" name="orderDetails[0].price" value="4999" />
                    </td>
                    <td><input id="orderDetails[0].nums" type="number" name="orderDetails[0].nums" value="2" /></td>
                </tr>
                <tr>
                    <td><input id="orderDetails[1].name" type="text" name="orderDetails[1].name" value="MIX 4 512g" />
                    </td>
                    <td><input id="orderDetails[1].price" type="number" name="orderDetails[1].price" value="5999" />
                    </td>
                    <td><input id="orderDetails[1].nums" type="number" name="orderDetails[1].nums" value="1" /></td>
                </tr>
                <tr>
                    <td><input id="orderDetails[2].name" type="text" name="orderDetails[2].name" value="小米11 256g" />
                    </td>
                    <td><input id="orderDetails[2].price" type="number" name="orderDetails[2].price" value="2999" />
                    </td>
                    <td><input id="orderDetails[2].nums" type="number" name="orderDetails[2].nums" value="3" /></td>
                </tr>

            </table>
        </label>

        <label>
            <span> </span>
            <input type="submit" class="button" value="下单" />
        </label>
    </form>
</body>

</html>